import axios from 'axios'
axios.defaults.baseURL = 'http://localhost:8080';
export function get(url){
	return new Promise((resolve,reject)=>{
		axios.get(url)
		.then((res)=>{
			resolve(res);
		}).catch((res)=>{
			reject(res);
		})
	})
}

export function post(url,data){
	return new Promise((resolve,reject)=>{
		axios.post(url,data)
		.then((res)=>{
			resolve(res);
		}).catch((res)=>{
			reject(res);
		})
	})
}
export default axios